<!--
/*
 * Displays the graphs generated in the graphs folder
 */
-->
<html>
<head>

<title></title>
</head>
<body>

<h2>
<?php
	//displays the survey title
	echo $title; 
?>
</h2>

<?php
//an option to return to the text report of the survey
echo anchor('user/view_survey_report'.'/'.$id.'/'.$survey_id,'Return to General Report'); echo "<br />";

//displays the graph separated by the categories.
//this is used when survey is defined to have question categories
if($has_groups)
{
	$N = count($graph);
	for($i = 0; $i < $N; $i++)
	{
		if($graph[$i] != null)
		{
			echo "<center><h3>".$category->row($i)->category_name."</h3></center><br>";
			echo "<center><img src='". base_url(). $graph[$i]."'/></center><br>";
		}
	}
//displays the graph created
}else 
{
	if ($graph != null)
	{
		echo "<center><img src='". base_url(). $graph."'/></center>";
	}
} 
?>
</body>
</html>